{% extends 'blog_base.html' %}
{% block blog_content %}
    <div class="blog-list-container-left-content">
        {% for post in posts.items %}
            <h1><span class="text-info">[{{ post.category }}]</span><a href="posts/{{ post.post_id }}">{{ post.post_title }}</a></h1>
            <div class="text-info">
                <span class="lead">by Admin</span>
                <span class="glyphicon glyphicon-time"></span> Posted on {{ post.post_date }}
            </div>
            <hr>
        {% endfor %}
    <!-- pager -->
    <ul class="pager text-info">
        {% if posts.has_prev %}
            <li class="previous"><a href="/categories/{{ posts.items[0].category_id }}/posts?page={{posts.prev_num}}">&larr; Pre</a> </li>
        {% else %}
            <li class="previous disabled"><a href="#" >&larr; Pre</a></li>
        {% endif %}
        <li><span>{{ posts.page }}</span></li>
        {% if posts.has_next %}
             <li class="next"><a href="/categories/{{ posts.items[0].category_id }}/posts?page={{posts.next_num}}">Next &rarr;</a></li>
        {% else %}
            <li class="next disabled"><a  href="#">Next &rarr;</a></li>
        {% endif %}
    </ul>
</ul>

    </div>
{% endblock %}
